$(document).ready(function() {
		$(".addForm").validate({
			onfocusout : function(element) {
				$(element).valid();
			},
			rules : {
				oldPassword : {
					required : true
				},
				newPSW : {
					required : true,
					rangelength : [ 4, 20 ]
				},
				confirm_password : {
					required : true,
					minlength : 5,
					equalTo : "#password"
				}
			},
			messages : {
				oldPassword : "请输入旧密码",
				newPSW : {
					required : "请输入新密码",
					rangelength : "密码最少4个字符，最多20个字符！"
				},
				confirm_password : {
					required : "请输入确认密码",
					minlength : "确认密码不能小于4个字符",
					equalTo : "两次输入密码不一致"
				}
			}
		});
	});